home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 15 / CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso / CUCD / Graphics / Gallery / Source / main.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-15  |  1.9 KB  |  75 lines

  1. #define __VERSION__     "39"
  2. #define __REVISION__     "8"
  3. #define __NAME__            "Gallery"
  4. #define __AUTHOR__        "Markus Hillenbrand"
  5.  
  6. /*********************************************************************************************************/
  7.  
  8. #include <string.h>
  9. #include <stdlib.h>
  10. #include <stdio.h>
  11. #include <stream.h>
  12.  
  13. #include "GUICINCLUDE:GUIC_System.hpp"
  14. #include "GUICINCLUDE:GUIC_Application.hpp"
  15. #include "GUICINCLUDE:GUIC_Screen.hpp"
  16. #include "GUICINCLUDE:GUIC_Message.hpp"
  17. #include "GUICINCLUDE:GUIC_Event.hpp"
  18. #include "GUICINCLUDE:GUIC_Error.hpp"
  19. #include "GUICINCLUDE:GUIC_Exceptions.hpp"
  20. #include "GUICINCLUDE:GUIC_AmigaGuide.hpp"
  21. #include "GUICINCLUDE:GUIC_FileExamine.hpp"
  22.  
  23. #include "GalleryWindow.hpp"
  24.  
  25. /*********************************************************************************************************/
  26.  
  27. STRPTR V = "$VER: " __NAME__ " " __VERSION__ "." __REVISION__ " (" __DATE__ ")";
  28.  
  29. /*********************************************************************************************************/
  30.  
  31. VOID main (LONG argc, STRPTR argv[])
  32. {
  33.     GUIC_SystemC::checkStackSize(50000);
  34.     
  35.     GUIC_ApplicationC app(__NAME__);
  36.  
  37.     app.setAuthor        (__AUTHOR__);
  38.     app.setVersion    (__VERSION__);
  39.     app.setRevision    (__REVISION__);
  40.     app.setDate        (__DATE__);
  41.     app.setTime        (__TIME__);
  42.     app.setInitializer    (TRUE);
  43.  
  44.     GUIC_AmigaGuideC    amigaGuide("Gallery.guide");
  45.     GUIC_ScreenC            screen;
  46.     GalleryWindowC     gWindow (app, screen);
  47.     
  48.     screen.setName                ("Gallery - (c) by Markus Hillenbrand");
  49.     screen.setPublicMode        (TRUE);
  50.     screen.setPublicName    ("Gallery Pubscreen");
  51.     
  52.     screen.add(gWindow);
  53.  
  54.     app.add(amigaGuide);
  55.     app.add(screen);
  56.     app.start();
  57.  
  58.     BOOL running = TRUE;
  59.     GUIC_EventC *event = 0;
  60.  
  61.     LONG count = 0;
  62.     
  63.     while (running && (event = app.wait()) )
  64.         {
  65.         if (event->id == GUIC_CloseWindow)
  66.             {
  67.             GUIC_MessageC    message    ("Gallery", "Do you really want to quit ?", "Yes|No");
  68.             if (1 == message.request(*event->window)) running = FALSE;
  69.             }
  70.         }
  71.  
  72.     app.stop();
  73. }
  74.  
  75.